package action;

import modele.Client;
import modele.Film;
import modele.Pret;

import com.opensymphony.xwork2.ActionSupport;

import data.ClientXML;
import data.FilmXML;
import data.PretXML;

public class DetailPret extends ActionSupport {

	private static final long serialVersionUID = 1694670991851843191L;

	private int idPret;
	private Film film;
	private Client client;
	
	public String execute() throws Exception {
		PretXML pretXML = new PretXML();
		Pret pret = pretXML.getPret(idPret);
		ClientXML clientXML = new ClientXML();
		client = clientXML.getClient(pret.getClient_id());
		FilmXML filmXML = new FilmXML();
		film = filmXML.getFilm(pret.getFilm_id());
		return SUCCESS;
	}

	public int getIdPret() {
		return idPret;
	}

	public void setIdPret(int idPret) {
		this.idPret = idPret;
	}

	public Film getFilm() {
		return film;
	}

	public void setFilm(Film film) {
		this.film = film;
	}

	public Client getClient() {
		return client;
	}

	public void setClient(Client client) {
		this.client = client;
	}

	
}